<?
require("config.php");

$show_backnav = "menu";
$location_status .= "| Delete";


$menutype = 2;

if (NULL!=$action){

   $Query = "delete from $table where id=$id Limit 1";

   myQuery($Query);


   header("location:" . $rela_path . "share/msg.php?v=713&id=$parent_id");

   exit();

}


if (!checkRecord($table,$id)){

	header("location:" . $rela_path . "share/msg.php?v=9002");
  
}

$Query = "select 
	code,
	name,
	course,
	date,
	datedetails,
	time,
	venue,
	country,
	presented,
	currency,
	fee,
	remark,
	contact,
	contact_tel,
	contact_email,
	status,
	publish_date,
	picture1,
	picture2,
	picture3,
	picture4,
	expiring_date,
	currency1,
	currency2,
	currency3,
	currency4,
	currency5,
	fee1,
	fee2,
	fee3,
	fee4,
	fee5,
	description1,
	description2,
	description3,
	description4,
	description5,
	order_index, showcase, course_link, trainer_link, country2, vat, price
from $table where id='$id' Limit 1";
$r = myQuery($Query);




	$Code=		$r[0][0];
	$Name=	$r[0][1];
	$Course=	$r[0][2];
	$Date=	$r[0][3];
	$DateDetails=	$r[0][4];
	$Time=	$r[0][5];
	$Venue=	$r[0][6];
	$Country=	$r[0][7];
	$Presented=	$r[0][8];
	$Currency=	$r[0][9];
	$Fee=	$r[0][10];
	$Remark=$r[0][11];
	$Contact=	$r[0][12];
	$ContactTel=	$r[0][13];
	$ContactEmail=	$r[0][14];
	$Status=	$r[0][15];
	$Publish_date=	$r[0][16];

	$Picture1= $r[0][17];
	$Picture2= $r[0][18];
	$Picture3= $r[0][19];
	$Picture4= $r[0][20];
	$Expiring_date = $r[0][21];

	$Currency1= $r[0][22];
	$Currency2= $r[0][23];
	$Currency3= $r[0][24];
	$Currency4= $r[0][25];
	$Currency5= $r[0][26];
	$Fee1= $r[0][27];
	$Fee2= $r[0][28];
	$Fee3= $r[0][29];
	$Fee4= $r[0][30];
	$Fee5= $r[0][31];
	$Description1= $r[0][32];
	$Description2= $r[0][33];
	$Description3= $r[0][34];
	$Description4= $r[0][35];
	$Description5= $r[0][36];
	$Order_index= $r[0][37];
$showcase=$r[0][38];
$course_link=$r[0][39];
$trainer_link=$r[0][40];
$Country2=$r[0][41];
$Vat=$r[0][42];
$Price=$r[0][43];
require($rela_path . "inc/header.php");
require($rela_path . "bin/date.php");
?>

<!--Content Start-->
<form action="" method="post" enctype="multipart/form-data" name="form1">  
<!--hidden filed-->
<input name="id" type="hidden" value="<?print($id)?>">
<input name="parent_id" type="hidden" value="<?print($parent_id)?>">
<input name="action" type="hidden" value="delete">

<?

if ($label){

	echo "<input type=\"hidden\" name=\"Course\" value=\"$label\">";
	echo "<input type=\"hidden\" name=\"Course1\" value=\"" . eregi_replace("&", "&amp;", $label) . "\">";

}

?>

  <table width="95%" border="0" align="center">
                      <tr> 
                        
      <td>&nbsp; </td>
                      </tr>
                      <tr> 
                        
      <td><strong>Are you sure to delete this schedule ?</strong> <input type="Submit" class="button" name="Button" value="   Yes   "> 
        <input type="button" class="button" name="Submit2" value="   No   " onClick="Redirect('menu.php?id=<?=$parent_id?>',1);"> 
        <br>
        <br>
        <table border="0">
          <tr> 
            <td class="tdheader">Schedule No. :</td>
            <td> <?print($Code)?> </td>
          </tr>
          <tr> 
            <td class="tdheader">Description : </td>
            <td><?print($Name)?></td>
          </tr>
          <tr> 
            <td class="tdheader">Course :</td>
            <td> <?echo $Course?>            </td>
          </tr>
          <tr> 
            <td class="tdheader">Start on :</td>
            <td>
			<?print(OutDate($Date))?>			</td>
          </tr>
          <tr> 
            <td class="tdheader">Date Details :</td>
            <td><?print(htmlencode($DateDetails))?></td>
          </tr>
          <tr> 
            <td class="tdheader">Time :</td>
            <td><?print(htmlencode($Time))?></td>
          </tr>
          <tr> 
            <td class="tdheader">Venue : </td>
            <td><?print(htmlencode($Venue))?></td>
          </tr>
          <tr>
            <td class="tdheader">Language :</td>
            <td><?echo $Country2?></td>
          </tr>
          <tr> 
            <td class="tdheader">Country :</td>
            <td><?echo $Country?></td>
          </tr>
          <tr> 
            <td class="tdheader">Presented in : </td>
            <td><?print($Presented)?></td>
          </tr>
<!--

          <tr> 
            <td class="tdheader">Fee :</td>
            <td> 
              <?echo $Currency?>
              <?echo $Fee?> 
            </td>
          </tr>
-->
          <tr> 
            <td class="tdheader">Remark : </td>
            <td><?print($Remark)?></td>
          </tr>



          <tr> 
            <td class="tdheader">Contact Person :</td>
            <td> <?echo $Contact?>            </td>
          </tr>

          <tr> 
            <td class="tdheader">Contact Tel :</td>
            <td><?print($ContactTel)?></td>
          </tr>



          <tr> 
            <td class="tdheader">Contact E-mail :</td>
            <td><?print($ContactEmail)?></td>
          </tr>



          <tr> 
            <td class="tdheader">Picture 1: </td>
            <td><?loadImage2($Picture1,$rela_path . $PIC_DIR. $table . "/")?></td>
          </tr>
          <tr> 
            <td class="tdheader">Picture 2: </td>
            <td><?loadImage2($Picture2,$rela_path . $PIC_DIR. $table . "/")?></td>
          </tr>
          <tr> 
            <td class="tdheader">Picture 3: </td>
            <td><?loadImage2($Picture3,$rela_path . $PIC_DIR. $table . "/")?></td>
          </tr>
          <tr> 
            <td class="tdheader">Picture 4: </td>
            <td><?loadImage2($Picture4,$rela_path . $PIC_DIR. $table . "/")?></td>
          </tr>




<?for ($i=1;$i<4;$i++){
	
$v1 = "Currency$i";
$v2 = "Fee$i";
$v3 = "Description$i";
	?>
          tr> 
            <td class="tdheader">Fee <?=$i?>:</td>
            <td>
<TABLE>
<TR>
	<TD>Currency:</TD>
	<TD><?=$$v1?></TD>
</TR>
<TR>
	<TD>Fee:</TD>
	<TD><?=$$v2?></TD>
</TR>
<TR>
	<TD>Description:</TD>
	<TD><?=$$v3?></TD>
</TR>
</TABLE>            </td>
          </tr
<?}?>

          
         <!-- <TR>
        	<TD colspan=2 class="tdheader">Price (without VAT)</TD>
          </TR>
          <TR>
        	<TD class="tdheader">Original Price</TD>
        	<TD><?=$Price?></TD>
          </TR>
          <TR>
        	<TD class="tdheader">Special Price</TD>
        	<TD><?php echo getSpecialPrice($Price);?></TD>
          </TR>
          <TR>
        	<TD class="tdheader">Special Group Price</TD>
        	<TD><?php echo getSpecialGroupPrice($Price);?></TD>
          </TR>
          <TR>
        	<TD class="tdheader">VAT Amount </TD>
        	<TD><?=$Vat?></TD>
          </TR>
          <TR>
        	<TD colspan=2 class="tdheader">Price (with VAT)</TD>
          </TR>
          <TR>
        	<TD class="tdheader">Price</TD>
        	<TD><? echo getPrice($Price, $Vat)?></TD>
          </TR>
          <TR>
        	<TD class="tdheader">Special Price</TD>
        	<TD><?php echo getSpecialPrice($Price, $Vat);?></TD>
          </TR>
          <TR>
        	<TD class="tdheader">Special Group Price</TD>
        	<TD><?php echo getSpecialGroupPrice($Price, $Vat);?></TD>
          </TR>-->
		  
		  


          <tr>
            <td><strong>Course Name Link: </strong></td>
            <td><?echo $course_link?></td>
          </tr>
          <tr>
            <td><strong>Trainer Name Link: </strong></td>
            <td><?echo $trainer_link
?></td>
          </tr>
          <tr>
            <td class="tdheader"><strong>Sharing Showcase:</strong></td>
            <td><?
if ($showcase==0) echo "No";
if ($showcase==1) echo "Yes";
?>            </td>
          </tr>
          <tr> 
            <td class="tdheader">Publish :</td>
            <td> <?echo $Status?></td></tr>





          <tr> 
            <td class="tdheader">Publishing Date :</td>
            <td> <?echo OutDate($Publish_date)?></td></tr>

          <tr> 
                  <td class="tdheader">Expiring Date :</td>
                  <td><?print(OutDate($Expiring_date))?></td>
                </tr>
        </table>
      </td>
    </tr>
    <tr>
      <td>&nbsp;</td>
    </tr>
  </table>

</form>
<!--Content End-->
<?require($rela_path . "inc/footer.php");?>
        